<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the getAllHtmlPitch method from the PitchAccentField class, for the Dart programming language.">
  <title>getAllHtmlPitch method - PitchAccentField class - creator library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" rel="stylesheet">
  
  <link rel="stylesheet" href="../../static-assets/github.css?v1">
  <link rel="stylesheet" href="../../static-assets/styles.css?v1">
  <link rel="icon" href="../../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../../" data-using-base-href="false" class="light-theme">

<div id="overlay-under-drawer"></div>

<header id="title">
  <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">yuuna</a></li>
    <li><a href="../../creator/creator-library.html">creator</a></li>
    <li><a href="../../creator/PitchAccentField-class.html">PitchAccentField</a></li>
    <li class="self-crumb">getAllHtmlPitch static method</li>
  </ol>
  <div class="self-name">getAllHtmlPitch</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
  <div class="toggle" id="theme-button">
    <label for="theme">
      <input type="checkbox" id="theme" value="light-theme">
      <span id="dark-theme-button" class="material-symbols-outlined">
        brightness_4
      </span>
      <span id="light-theme-button" class="material-symbols-outlined">
        brightness_5
      </span>
    </label>
  </div>
</header>
<main>

  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-method">getAllHtmlPitch</span> static method 
</h1></div>

    <section class="multi-line-signature">
      

<span class="returntype"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
<span class="name ">getAllHtmlPitch</span>(<wbr><ol class="parameter-list"><li><span class="parameter" id="getAllHtmlPitch-param-appModel">{<span>required</span> <span class="type-annotation"><a href="../../models/AppModel-class.html">AppModel</a></span> <span class="parameter-name">appModel</span>, </span></li>
<li><span class="parameter" id="getAllHtmlPitch-param-heading"><span>required</span> <span class="type-annotation"><a href="../../dictionary/DictionaryHeading-class.html">DictionaryHeading</a></span> <span class="parameter-name">heading</span>}</span></li>
</ol>)

      

    </section>
    
<section class="desc markdown">
  <p>Returns Furigana for multiple <a href="../../dictionary/DictionaryPitch-class.html">DictionaryPitch</a>.</p>
</section>


    
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">static String getAllHtmlPitch(
    {required AppModel appModel, required DictionaryHeading heading}) {
  List&lt;Dictionary&gt; dictionaries = appModel.dictionaries;

  Map&lt;String, bool&gt; dictionaryNamesByHidden = Map&lt;String, bool&gt;.fromEntries(
      dictionaries
          .map((e) =&gt; MapEntry(e.name, e.isHidden(appModel.targetLanguage))));
  Map&lt;String, int&gt; dictionaryNamesByOrder = Map&lt;String, int&gt;.fromEntries(
      dictionaries.map((e) =&gt; MapEntry(e.name, e.order)));

  List&lt;DictionaryPitch&gt; pitches = heading.pitches
      .where(
          (entry) =&gt; !dictionaryNamesByHidden[entry.dictionary.value!.name]!)
      .toList();
  pitches.sort((a, b) =&gt; dictionaryNamesByOrder[a.dictionary.value!.name]!
      .compareTo(dictionaryNamesByOrder[b.dictionary.value!.name]!));

  if (pitches.isEmpty) {
    return &#39;&#39;;
  }

  StringBuffer html = StringBuffer();

  pitches.forEachIndexed((index, pitch) {
    html.write(
      PitchSvg._pitchSvg(
        heading.reading,
        PitchSvg._pitchValueToPatt(heading.reading, pitch.downstep),
      ),
    );
    if (index != pitches.length - 1) {
      html.write(&#39;&lt;br&gt;&#39;);
    }
  });

  return html.toString();
}</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../../index.html">yuuna</a></li>
  <li><a href="../../creator/creator-library.html">creator</a></li>
  <li><a href="../../creator/PitchAccentField-class.html">PitchAccentField</a></li>
  <li class="self-crumb">getAllHtmlPitch static method</li>
</ol>


    <h5>PitchAccentField class</h5>
    <ol>



        <li class="section-title inherited">
          <a href="../../creator/PitchAccentField-class.html#instance-properties">Properties</a>
        </li>
          <li class="inherited"><a href="../../creator/Field/description.html">description</a></li>
          <li class="inherited"><a href="../../creator/Field/descriptionLocalisation.html">descriptionLocalisation</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
          <li class="inherited"><a href="../../creator/Field/icon.html">icon</a></li>
          <li class="inherited"><a href="../../creator/Field/label.html">label</a></li>
          <li class="inherited"><a href="../../creator/Field/labelLocalisation.html">labelLocalisation</a></li>
          <li class="inherited"><a href="../../creator/Field/maxLines.html">maxLines</a></li>
          <li class="inherited"><a href="../../creator/Field/multiline.html">multiline</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
          <li class="inherited"><a href="../../creator/Field/uniqueKey.html">uniqueKey</a></li>

        <li class="section-title"><a href="../../creator/PitchAccentField-class.html#instance-methods">Methods</a></li>
          <li class="inherited"><a href="../../creator/Field/getLocalisedDescription.html">getLocalisedDescription</a></li>
          <li class="inherited"><a href="../../creator/Field/getLocalisedLabel.html">getLocalisedLabel</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
          <li><a href="../../creator/PitchAccentField/onCreatorOpenAction.html">onCreatorOpenAction</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>

        <li class="section-title inherited"><a href="../../creator/PitchAccentField-class.html#operators">Operators</a></li>
          <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>


        <li class="section-title"><a href="../../creator/PitchAccentField-class.html#static-properties">Static properties</a></li>
          <li><a href="../../creator/PitchAccentField/instance.html">instance</a></li>

        <li class="section-title"><a href="../../creator/PitchAccentField-class.html#static-methods">Static methods</a></li>
          <li><a href="../../creator/PitchAccentField/getAllHtmlPitch.html">getAllHtmlPitch</a></li>

        <li class="section-title"><a href="../../creator/PitchAccentField-class.html#constants">Constants</a></li>
          <li><a href="../../creator/PitchAccentField/key-constant.html">key</a></li>
</ol>

  </div><!--/.sidebar-offcanvas-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    yuuna
      2.8.0+93
  </span>

  
</footer>



<script src="../../static-assets/highlight.pack.js?v1"></script>
<script src="../../static-assets/docs.dart.js"></script>



</body>

</html>

